<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>faustctl</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="faustcompile.html" title="faustcompile" />
    <link rel="next" href="faustgen.html" title="faustgen" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">faustctl</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="faustcompile.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="faustgen.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="faustctl"></a>
      <div class="titlepage"></div>
      <a id="Indexfaustctl" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">faustctl</span>
        </h2>
        <p>faustctl — 
      Adjusts a given control in a Faust DSP instance.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp102255008"></a>
        <h2>Description</h2>
        <p>
      Faustctl will set a given control in a running faust program
    </p>
      </div>
      <div class="refsect1">
        <a id="idp102256192"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>faustctl</strong></span> idsp,Scontrol,kval </pre>
      </div>
      <div class="refsect1">
        <a id="idp102313888"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em><span class="quote">“<span class="quote">Scontrol</span>”</span></em></span> --  a string containing the control name
</p>
        <p>
      <span class="emphasis"><em><span class="quote">“<span class="quote">idsp</span>”</span></em></span> -- a handle to an existing Faust DSP instance
</p>
      </div>
      <div class="refsect1">
        <a id="idp102316672"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em><span class="quote">“<span class="quote">kval</span>”</span></em></span> -- value to which the control will be set.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp102318464"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the faustctl opcode, with a simple program that adjusts the gain of an input:
      </p>
        <div class="example">
          <a id="idp102319520"></a>
          <p class="title">
            <strong>Example 245. </strong>
          </p>
          <div class="example-contents">
            <p>   
</p>
            <pre class="programlisting">
idsp,a1 <span class="op">faustgen</span> {{
gain = hslider("vol",1,0,1,0.01);
process = (_ * gain); 
}}, ain1
<span class="op">faustctl</span> idsp, "vol", 0.5
 </pre>
            <p>
    </p>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
      <div class="refsect1">
        <a id="idp102322656"></a>
        <h2>Credits</h2>
        <p>Author: Victor Lazzarini, 2013 </p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="faustcompile.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="OpcodesTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="faustgen.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">faustcompile </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> faustgen</td>
        </tr>
      </table>
    </div>
  </body>
</html>
